package cn.wx.scholar.core.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.scholar.core.entity.qo.UserQ;
import cn.wx.scholar.core.service.UserService;

/**
 * @description : Login 控制器 ---------------------------------
 * @author
 * @since 2018-09-11
 */
@RestController
@RequestMapping("/sholarLogin")
public class LoginController extends BaseController {

	@Autowired
	private UserService userService;

	@RequestMapping(value = "/validate", method = RequestMethod.POST)
	public ResponseData queryUnique(UserQ userQ) throws Exception {
		return success(userService.login(userQ));

	}

}